<?php
$_GET['state'] = isset($_GET['state']) ? trim($_GET['state']) : '';
$oTheme = new Theme();
$theme_list = $oTheme->get_all('*', $_GET, $order = array());
$arr = array();
foreach($theme_list['list'] as $row){
	$row['preview'] = json_decode($row['preview']);
	$row['preview'] = array_shift($row['preview']);
	//$row['desc'] = strip_tags($row['desc']);
	//$row['desc'] = mb_substr($row['desc'], 0, 320, 'utf-8');
	$arr[] = $row;
}
$vars['list'] = $arr;
$vars['total'] = count($theme_list['list']);

// 搜索
$vars['state_options'] = make_options(array('未启用', '启用'), true, $_GET['state']);
?>